{% extends "with_header.html" %}

{% block body %}
<!-- Begin all feeds -->

<h2 align="center">Albums</h2>
{% if not alluseralbums %}
  <h2>There are no albums to view!</h2>
{% else %}

  {% for useralbums in alluseralbums %}
    <table align="center" width="500px">
      <tr><td align='center' colspan='3'><a href='/user?u={{ useralbums.username }}'>{{ useralbums.username }}'s</a> Photos</td></tr>
      <tr style="white-space:nowrap">
        <th>Title</th><th>Photos</th><th>Date</th>
      </tr>
      {% for album in useralbums.albums %}
        <tr>
          <td><a href="/feed?{% ifnotequal useralbums.username current_username %}u={{ useralbums.username }}&{% endifnotequal %}a={{ album.album_id }}">{{ album.title }}</a></td>
          <td>{{ album.numphotos }}</td>
          <td>{{ album.updated }}</td>
      {% endfor %}
      </tr>
    </table><br/><br/><br/>
  {% endfor %}

{% endif %}

<br/><br/><br/><br/>

<!-- End all feeds -->
{% endblock %}